<% gcp_project_id = "#{external_attribute(pwd, 'gcp_project_id', doc_generation)}" -%>
<% backend_service = grab_attributes(pwd)['backend_service'] -%>
describe google_compute_backend_services(project: <%= gcp_project_id -%>) do
  its('count') { should be >= 1 }
  its('names') { should include <%= doc_generation ? "'#{backend_service['name']}'" : "backend_service['name']" -%> }
  its('port_names') { should include <%= doc_generation ? "'#{backend_service['port_name']}'" : "backend_service['port_name']" -%> }
  its('protocols') { should include <%= doc_generation ? "'#{backend_service['protocol']}'" : "backend_service['protocol']" -%> }
  its('timeout_secs') { should include <%= doc_generation ? "'#{backend_service['timeout_sec']}'" : "backend_service['timeout_sec']" -%> }
end